package com.bh.extend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 客户货品对象 jc_db_product
 *
 * @author slx
 * @date 2023-03-26
 */
@ApiModel(value = "客户货品对象", description = "客户货品对象")
@TableName("jc_db_product")
@Data
public class JcDbProduct {
    

    /**
     * 货品类型
     */
    @Excel(name = "货品类型")
    private String type;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 所属客户
     */
    @Excel(name = "所属客户")
    private Long customerId;

    /**
     * 货品名称
     */
    @Excel(name = "货品名称")
    private String name;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Long status = 1L;

    /**
     * 单位
     */
    @Excel(name = "单位")
    private String unit;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("status", getStatus())
                .append("unit", getUnit())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .toString();
    }
}
